std::memchr
From Cppreference
| Defined in header
<cstring> | ||
| const void *memchr( const void *ptr, int ch, size_t count );
| ||
| void *memchr( void *ptr, int ch, size_t count );
| ||
Finds the first occurrence of the byte ch in the memory region pointed to by ptr.
Contents |
Parameters
| ptr | - | pointer to the memory region to be examined |
| ch | - | byte to search for |
| count | - | number of bytes to examine |
Return value
pointer to the found byte, or NULL if no such byte is found.
Example
| This section is incomplete |
See also
| finds the first occurrence of a character (function) | |